package interfaceDemo1;

import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-10-15
 * Time: 20:11
 */
public class Test {
    public static void main(String[] args) {
        Frog frog = new Frog("小青",12);
        System.out.println(frog.getName() + "," + frog.getAge());
        frog.eat();
        frog.swim();

        Rabbit rabbit = new Rabbit("小白",4);
        System.out.println(rabbit.getName() + "," + rabbit.getAge());
        rabbit.eat();
    }
}
